package com.github.demo.circularDependency;


import com.github.jsoncat.annotation.ioc.Autowired;
import com.github.jsoncat.annotation.springmvc.GetMapping;
import com.github.jsoncat.annotation.springmvc.RestController;
import com.github.jsoncat.core.ioc.AutowiredBeanInitialization;

@RestController("/circular-dependency")
public class CircularDependencyController {

    @Autowired
    CircularDependencyA testA;

    @Autowired
    CircularDependencyB testB;

    @Autowired
    private CircularDependencyC testC;

    @GetMapping("/get")
    public void test() {
        System.out.println(testA.testA());
        System.out.println(testB.testB());
        System.out.println(testA.getCircularDependencyB());
        System.out.println(AutowiredBeanInitialization.SINGLETON_OBJECTS);
        testC.testC();
    }
}
